all:SuggestionSlice client

TOPDIR=..
EXE=client
OBJ=sg_ice.o client.o
CXXFLAGS=-ggdb -O2 -Wall	# -DDEBUG
CXX=g++

## ICE CONF
ICE_HOME=/opt/Ice-3.4.2
SLICE2CPP=$(ICE_HOME)/bin/slice2cpp
## ICE CONF

LIBS=-L$(ICE_HOME)/lib -lIce
INCLUDES=-I. -I$(ICE_HOME)/include
RM=rm
CP=cp

%.o:%.cpp
	$(CXX) $(CXXFLAGS) -c $(INCLUDES) $<

SuggestionSlice:../src/slice/sg_ice.ice
	$(SLICE2CPP) $<
	$(CXX) $(CXXFLAGS) -c $(INCLUDES) sg_ice.cpp

$(EXE):$(OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(LIBS)
	$(CP) -rf $@ $(TOPDIR)/bin

clean:
	$(RM) -rf $(OBJ) $(EXE) $(TOPDIR)/bin/$(EXE) sg_ice.*
